Refactor LaTeX methods in catlog-wasm and catlog#1319
Open
tim-at-topos wants to merge 42 commits into
Open
Conversation
WIP: Rethinking traits WIP: Some tests only half failing WIP: Tests passing; time to tidy ENH: Build derived model of th_signed_polynomial_ode_system in mass_action ENH: Mass-action for stock-flow; DEL: Mass-action for signed stock-flow ENH: struct for transition / flow interfaces WIP: Starting on Lotka-Volterra WIP: Failing tests FIX: Lotka-Volterra tests passing FIX: Working analysis (frontend) ENH: Lotka-Volterra equations ENH: Linear ODE refactor ENH: Linear ODE equations WIP: Starting on ODESemantics WIP: lotka_volterra_semantics() WIP: build_system_from_ode_semantics WIP: DblModelForODESemantics WIP: ODESemanticsAnalysis and ODESemanticsProblemData WIP: ODESemantics trait WIP: Documentation WIP: ODESemantics for mass-action WIP: Cleaning up types, but mass-action still frustrating WIP: Big reshuffle (moving functions out from a struct) WIP: Fixing mass-action again WIP: terrible code WIP: Changed from ObGen to Ob WIP: Stock-flow mass-action FIX: Passing catlog tests Rename LinearODE -> LCC FIX: Documentation TODO: Redesign
e71f793 to
7a8e39c
Compare
343e557 to
46de547
Compare
3da1897 to
b8071ee
Compare
d121fcf to
247bfa3
Compare
e7cf73f to
d0a07a5
Compare
88df96c to
d350cf7
Compare
Contributor
Author
|
@kasbah could you please help me to fix the failing npm checks? |
This was
linked to
issues
Jun 25, 2026
This was referenced Jun 25, 2026
7c492f7 to
d350cf7
Compare
…n_config_form.tsx
e83e6c9 to
29a8b4e
Compare
This was
linked to
issues
Jun 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #1251
Now that more ODE analyses have LaTeX equations, we should be stricter about the use of
fmt::Displayonly for debugging.This PR introduces some new types and traits (
Latex,ToLatex,ToLatexWithMap) for dealing with LaTeX expressions and rendering object/morphism names nicely in the frontend. It also includes a bunch of tests for ODE semantics in the wasm layer. Finally, as a bonus, it removes a lot of repetitive code fromcatlog-wasm::src::analysesby definingode_semantics_simulationandode_semantics_equations, enabled by #1251, as well as removing some unnecessary types introduced there (such asLotkaVolterraEquationsData, which is justnull).Again, this refactor adds a lot of lines, but that's almost entirely due to how many nice new tests it adds 👼
As a bonus, this PR fixes the following issues:
fmt::Displayfor LaTeX output #1171Although further refactoring is possible (e.g.
lotka_volterra.tsxandlinear_ode.tsxshare a lot of code), I think that the "correct" solution to this would be to start looking at generating that code from the definitions of the analyses rather than manually refactoring it. But this is now a much larger, rather separate project, so I think it's a bit out of scope.With that in mind, I would suggest that this PR finally completes the last item in #1177 , and thus closes the RFC-0001 parent issue #1098.